#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPushButton>
#include <QFileDialog>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QPushButton* btn = new QPushButton("按钮",this);

    QFileDialog* fd = new QFileDialog(this);
    connect(btn,&QPushButton::clicked,[=]()
    {
        QString str = fd->getOpenFileName(this,"文件","C://Users//14725//Desktop","*.jpg");
    });

}

MainWindow::~MainWindow()
{
    delete ui;
}

